<div class="body_main_container mycolleection_bottom_bg pos_relative">
		<div class="body_middle_container body_mar_b">
			<div class="body_top_height_start">
				<div class="text_row mycolleection">
					<div id="hash_name">
					<?if($_SESSION['usersinfo']->montage_hash_name==""){
						$montage_hash_name="";
					?>
					<div class="float_l"><h2>#MONTAGE</h2></div>
					<div class="float_l"><a href="javascript:void(0);" onclick="montagePopUp(1)" class="add_new_pick">ADD YOURS</a></div>
					<?}else{
						$montage_hash_name=$_SESSION['usersinfo']->montage_hash_name;
						if(strlen($montage_hash_name)>30){
							$montageLength=substr($montage_hash_name,0,30) . '..'; 
						}else{
							$montageLength=$montage_hash_name; 
						}
					?>
					<div  class="float_l"><h2>#<?echo $montageLength;?></h2></div>
					<div class="float_l"><a href="javascript:void(0);" onclick="montagePopUp(1)" title="Edit hash name" class="add_new_pick">EDIT</a></div>
					<?}?>
					</div>
					<div  id="your_title" class="float_r montage_tit_show">
					<?if($_SESSION['usersinfo']->montage_title==""){
						$montage_title="";
					?>
					<P><a href="javascript:void(0);" onclick="montagePopUp(2)" class="add_title">Add your Title here</a></P>
					<?}else{
						$montage_title=$_SESSION['usersinfo']->montage_title;
					?>
					<P><span><a href="javascript:void(0);" onclick="montagePopUp(2)" class="">EDIT TITLE&nbsp;&nbsp;&nbsp;&nbsp;</a></span><?echo $_SESSION['usersinfo']->montage_title;?></P>
					<?}?>
					</div>
				</div>
				<div class="clearfix"></div>
				<div class="" style="margin-top:1px;">
					<div class="row">
						<?
						$image="";
						if(strpos($_SESSION['usersinfo']->montage_main_image, "https://") !== false || strpos($_SESSION['usersinfo']->montage_main_image, "http://") !== false)
					   { 
							   $image=$_SESSION['usersinfo']->montage_main_image;
					   }else{
							$image=$basePath.'/images/project/montageMainImage/'.$_SESSION['usersinfo']->montage_main_image;
					   }
						if($_SESSION['usersinfo']->montage_main_image!=""){?>
						<div class="span180">
							<img id="MontageImage" src="<?php echo $image; ?>">
							<div style="position:absolute;bottom:20px;left:25%;">
								<p style="font-size:0.55em; text-decoration:underline;"><a href="javascript:void(0);" id="montagePic" onclick="updatemontageImage()" >CHANGE YOUR PICTURE</a><input style="display:none" type="file" name="change_image" id="change_image"></P>
							</div>
						</div>
						<?}else{?>
							<form id="montageUploadForm" method="post" enctype="multipart/form-data">
							<div class="span180" style="position:relative;">
								<img id="MontageImage" src="<?php echo $basePath; ?>/images/social_media/profile_img.png"/>
								<div style="position:absolute;bottom:20px;left:25%;">
								<p style="font-size:0.55em; text-decoration:underline;"><a href="javascript:void(0);" id="montagePic" onclick="updatemontageImage()" >ADD YOUR PICTURE</a><input style="display:none" type="file" name="change_image" id="change_image"></P>
							</div>
							</div>
							</form>
						<?}?>
							<div id="your_paragraph">
							<?if($_SESSION['usersinfo']->montage_paragraph==""){
								$montage_paragraph="";
							?>
							<div class="span700 profile_text_empty">
									<div id="montagPara_Div_id1" class="montage_Paragraph_show"><a href="javascript:void(0);" title="Edit your paragraph" onclick="montagePopUp(3)"><img src="<?php echo $basePath; ?>/images/social_media/profile_empty.png" class="edit_paragraph_mon_empty"/></a><p>No Writing competition needed here</p></div>
							</div>
							<?}else{
								$montage_paragraph=$_SESSION['usersinfo']->montage_paragraph;
							?>
							<div class="span700">
								<div id="montagPara_Div_id" class="montage_Paragraph_show"><P><?echo $_SESSION['usersinfo']->montage_paragraph;?><span><a href="javascript:void(0);" title="Edit your paragraph" onclick="montagePopUp(3)" class="edit_paragraph_mon_empty">EDIT</a></SPAN></P></div>
							</div>
							<?}?>
							</div>
					</div>
				</div>
			</div>
			<div class="pos_absolute tg_media_b">
			<div class="">
			<?
			$value=0;
			if($this->totalDataboxes==10){
				$value=10;
			}else{
				$value='0'.$this->totalDataboxes;
			}
			?>
			<p><span class="medium_collection">My MEDIA COLLECTIONS</span><span class="media_count">&nbsp;<? echo $value;?>/10</span><span class="media_private_boxes">&nbsp;(<? echo $this->privateCount;?> PRIVATE)</span></P>
		</div>
		</div>
		</div>
	</div>
<div class="body_main_container">
	<div class="body_middle_container body_mar_b">
		<div class="create_databox">
			<h3>no donuts. <br/>No Databoxes created :/</h3>
			<a href="<?php echo $baseUrl; ?>/databox/category-choice"><img src="<?php echo $basePath; ?>/images/social_media/databox_create.png"/></a>
			<h4>CLICK THE DONUT TO CREATE</h4>
			<h5>this particular page won’t be shown as databox <br/>
			unless you have at least 2 created public databoxes</h5>
		</div>
	</div>
</div>
<div class="clearfix"></div>
<div id="pop-up-hash" class="pop-up-display-content conform_popup_content">
	<div class="montage_desc">
		<h4>Please provide your montage hash name</h4>
		<p><input type="text" name="montage_hash_name" class="text_pad" id="montage_hash_name" value="#<?echo $montage_hash_name;?>" /></p>
	</div>
	<p>
		<a class="larg_btn" href="javascript:void(0);" onclick="montagePopUpClose(1)">CANCEL</a>
		<a class="larg_btn" href="javascript:void(0);" onclick="saveMontage(1)">CONTINUE</a>
	</p>
	<p id="hashMessageError"></p>
</div>
<div id="pop-up-title" class="pop-up-display-content conform_popup_content">
	<div class="montage_desc">
		<h4>Please provide your title</h4>
		<p><input type="text" name="montage_title" class="text_pad" id="montage_title" value="<?echo $montage_title;?>"/></p>
	</div>
	<p>
		<a class="larg_btn" href="javascript:void(0);" onclick="montagePopUpClose(2)">CANCEL</a>
		<a class="larg_btn" href="javascript:void(0);" onclick="saveMontage(2)">CONTINUE</a>
	</p>
	<p id="titleMessageError"></p>
</div>
<div id="pop-up-paragraph" class="pop-up-display-content conform_popup_content">
	<div class="montage_desc">
		<h4>Please provide your paragraph</h4>
		<p><textarea  name="montage_paragraph" class="text_pad" id="montage_paragraph" ><?echo $montage_paragraph;?></textarea></p>
	</div>
	<p>
		<a class="larg_btn" href="javascript:void(0);" onclick="montagePopUpClose(3)">CANCEL</a>
		<a class="larg_btn" href="javascript:void(0);" onclick="saveMontage(3)">CONTINUE</a>
	</p>
	<p id="paragraphMessageError"></p>
</div>
<script type="text/javascript" src="<?php echo $basePath; ?>/js/ckeditor/ckeditor.js"></script>
<script>
$('.edit_paragraph_mon_empty').click(function() {
	CKEDITOR.replace( 'montage_paragraph', {
});
});

$(function() {
	$('#pop-up-image-crop-new').cropit({
		imageBackground: true
	});
	$('.export').click(function() {
		var src = $('#pop-up-image-crop-new').cropit('export');
		var fetchUploadedUrl = BASE_URL+'/upload-montage-image';
		var imageId='<? echo $_SESSION['usersinfo']->userId?>';
		$("#l_i_c").show();
		$.ajax({
			type	: "POST",
			url		: fetchUploadedUrl,
			data	: { data: src,page:'montage',imageId:imageId},
			success: function(data){
				$("#l_i_c").hide();
				$('#pop-up-image-crop-new').popUpWindow({action: "close"});
				$('#MontageImage').attr('src',src);
				$('#montagePic').html("CHANGE YOUR PICTURE");
			}
		});
		//window.open(imageData);
	});
});

</script>